package cn.fresh.xuanyuan.module.system.job.tt;

import cn.fresh.xuanyuan.framework.tenant.core.job.TenantJob;
import cn.fresh.xuanyuan.module.system.service.social.SocialClientService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class DouYinAccessTokenJob {

    @Resource
    private SocialClientService socialClientService;

    @XxlJob("ttAccessTokenJobHandle")
    @TenantJob
    public void refreshDouYinAccessToken() {
        log.info("########## refreshDouYinAccessToken start ##########");
        socialClientService.refreshDouYinAccessToken();
        log.info("########## refreshDouYinAccessToken end ##########");
    }
}
